package com.sky.mapper;

import com.sky.annotation.Autofill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetMealDishMapper {
    /**
     * @return //    通过菜品id来查询所存在的套餐id
     */

     List<Long> getSetMealIdsByDishIds(List<Long> dishIds);

//     @Autofill(OperationType.INSERT)
    void inserts(List<SetmealDish> setmealDishes);

    List<SetmealDish> getSetMealsBySetMealId(Long setMealId);

    void deletes(List<Long> setMealIds);

    @Delete("delete from setmeal_dish where setmeal_id=#{id};")
    void deleteBySetMealId(Long setMealId);
}
